package jveins.base;

import jveins.VeinsAdapter;

public class BaseVeh implements Wave {
	protected int vehID;
	protected VeinsAdapter adapter;
	
	public BaseVeh(){
		vehID = -1;
		adapter = null;
	}
	
	public void init(){
	}
	
	public BaseVeh(VeinsAdapter initAdapter, int initID){
		vehID = initID;
		adapter = initAdapter;
		System.out.println("Java: BaseVeh created with id=" + initID);
	}
	
	public void onBeacon(String msg){
		System.out.println("Vehicle #" + vehID + " received beacon");
	}
	
	public void onData(String msg){
		System.out.println("Vehicle #" + vehID + " received data");
	}
	
	public void onSelfMsg(short kind){
		System.out.println("Vehicle #" + vehID + " received self message");
		//int x = 0;
		//adapter.messageToC(vehID, "Resonse to test message");

		//adapter.scheduleSelfMsg(vehID, "sendobs/26.3883484284295");
		//adapter.messageToC();
		//System.out.println("Response: " + x);
	}
	
	public void log(String msg){
		System.out.println("LOG: " + msg);
	}
}
